package week4;

import java.util.Scanner;
import static java.lang.System.out;
/**
 * Created by mc on 2017/3/18.
 */
public class exe61 {
    public static void main(String[] arges){
        test61 names = new test61();
        collectNameTo(names);
        out.println("访客名单:");
        printUpperCase(names);
    }


    static void collectNameTo(test61 names) {
        Scanner console = new Scanner(System.in);
         while(true){
             out.print("访客名称：");
             String name = console.nextLine();
             if(name.equals("quit")){
                 break;
             }
             names.add(name);
         }
    }
    private static void printUpperCase(test61 names) {
        for(int i=0;i<names.size();i++)
        {
            String name = (String) names.get(i);
            out.println(name.toUpperCase());
        }
    }


}
